#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <string.h>



int main()
{
	int arr[] = {12,12,15,15,13,16,18,18};
	int len = 8;
	int num = 0;
	int i = 0;
	int ret[2] = {0};
	for (i = 0; i < len; i++)
	{
		num ^= arr[i];
	}
	for (i = 0; i < 32; i++)
	{
		if (num & (1 << i))
			break;
	}
	for (int j = 0; j < len; j++)
	{
		if (arr[j] & (1 << i))
		{
			ret[0] ^= arr[j];
		}
		else
		{
			ret[1] ^= arr[j];
		}
	}
	printf("%d %d", ret[0], ret[1]);
	return 0;
}
